-
Notifications
You must be signed in to change notification settings - Fork 716
[nrf fromlist] drivers: i2s: nrfx_i2s: introduce prescaler calculation #3320
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[nrf fromlist] drivers: i2s: nrfx_i2s: introduce prescaler calculation #3320
Conversation
7869994
to
b5d0068
Compare
b5d0068
to
b8ab857
Compare
drivers/i2s/i2s_nrfx.c
Outdated
config->ratio = ratios[best_r].ratio_enum; | ||
LOG_INF("I2S MCK frequency: %u, actual PCM rate: %u", | ||
best_mck, best_mck / ratios[best_r].ratio_val); | ||
nrfx_i2s_prescalers_calc(src_freq, i2s_cfg->frame_clk_freq, config->sample_width, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't the return value be handled somehow?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added log, similar to how it have been handled before
b8ab857
to
c8df1dc
Compare
drivers/i2s/i2s_nrfx.c
Outdated
} | ||
} | ||
} | ||
if (!nrfx_i2s_prescalers_calc(src_freq, i2s_cfg->frame_clk_freq, config->sample_width, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nrfx_i2s_prescalers_calc
returns nrfx_err_t
, not bool
.
c8df1dc
to
a24dd1a
Compare
a24dd1a
to
30def77
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is some complaint from Compliance checks, but overall LGTM.
…nd MCK Ratios nRF53 series SoCs have a dedicated configurable audio PLL and the ability to enable MCK bypass via a register value CONFIG.CLKCONFIG. This can enable higher MCK/LRCK ratios that some I2S peripherals require the host to generate. Allow an application developer to choose if they want to initially look for a bypass ratio and, if found, enable bypass in the NRFX driver. If not, the standard MCK calculation is conducted as normal. Signed-off-by: Sean O'Connor <[email protected]> (cherry picked from commit 8115d9b)
Added usage of new API responsible for calculating I2S prescaler values. Upstream PR #: 96703 Signed-off-by: Michał Stasiak <[email protected]>
30def77
to
78d5af5
Compare
…rf54h20 PPR XIP Add overlay and config file required to run the uart_async_api test on nrf54h20dk/nrf54h20/cpuppr/xip platform. Signed-off-by: Sebastian Głąb <[email protected]> (cherry picked from commit e0a9a16)
3c9c5b7
into
nrfconnect:collab-nrfx-4.0
Added usage of new API responsible for calculating I2S prescaler values.
Upstream PR #: 96703